package cn.cs.client;

import cn.cs.common.Page;
import cn.cs.config.CsConfiguration;
import cn.cs.fallback.CsAgentShopClientFallBack;
import cn.cs.fallback.CsProductClientFallBack;
import cn.cs.pojo.CsAgentShop;
import cn.cs.pojo.CsProduct;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;

/**
* Created by yuexl
*/
@FeignClient(name = "cs-item-provider", configuration = CsConfiguration.class, fallback = CsAgentShopClientFallBack.class)
public interface RestCsAgentShopClient {

    @RequestMapping(value = "/getAgentShopById",method = RequestMethod.POST)
    public CsAgentShop getAgentShopById(@RequestParam("id") String id)throws Exception;

    @RequestMapping(value = "/getAgentShopListByMap",method = RequestMethod.POST)
    public List<CsAgentShop> getAgentShopListByMap(@RequestBody Map<String,Object> param)throws Exception;

    @RequestMapping(value = "/getAgentShopCountByMap", method = RequestMethod.POST)
    public Integer getAgentShopCountByMap(@RequestBody Map<String,Object> param)throws Exception;

}
